package com.niit.zerotestpdfreader;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.niit.zerotestpdfreader.entity.User;

public class UserInfo extends AppCompatActivity {

    private TextView userName;
    private TextView userPwd;
    private Button returnMain;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_user_info);

        userName = findViewById(R.id.userText);
        userPwd = findViewById(R.id.userPwd);

        Intent intent = getIntent();

        userName.setText(intent.getStringExtra("name"));
        userPwd.setText(intent.getStringExtra("pwd"));

        returnMain = findViewById(R.id.returnMain);
        returnMain.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intentReturnMain = new Intent(UserInfo.this, MainActivity.class);
                startActivity(intentReturnMain);
            }
        });

    }
}